package com.springboot.wisdom.serviceApi.user.model.vo;

import com.springboot.wisdom.common.common.constant.UserTypeEnum;
import com.springboot.wisdom.serviceApi.user.model.entity.UserDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.validation.annotation.Validated;

/**
 * @Description
 * @Author LY L
 * @Date 2024-11-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Validated
public class UserVO extends UserDO {
    /**
     * 验证码
     */
    private String emailCode;

    /**
     * 部门名称
     */
    private String deptName;

    /**
     * 角色名称
     */
    private String roleName;

    @ApiModelProperty(value = "角色类型：")
    private String roleType;

    public String getRoleType() {
        return UserTypeEnum.findEnumByValueToDesc(roleType);
    }
}
